package com.example.springboot.mapper;

import com.example.springboot.pojo.Count;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Component;

@Component
@Mapper
public interface CountMapper {
    @Select("select * from count")
    Count findAll();

    @Update("update count set dianzan = dianzan + 1 ")
    int updateDianZan();

    @Update("update count set pinglun = pinglun + 1 ")
    int updatePingLun();

    @Update("update count set dianzan = dianzan - 1 ")
    int cancelDrag();


}
